package com.gxa.weixing.core.pojo;


import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @author 雅风
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "tb_role")
@ApiModel(value = "管理人员")
public class Role {

  /**
   * 角色编号
   */
  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  @Column(name = "role_id")
  private Long roleId;

  /**
   * 姓名
   */
  @Column(name = "role_name")
  private String roleName;

  /**
   * 备注/详情
   */
  @Column(name = "role_remark")
  private String roleRemark;

  /**
   * 状态
   */
  @Column(name = "role_state")
  private Long roleState;

  /**
   * 修改时间
   */
  @Column(name = "role_update_time")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
  private Date roleUpdateTime;

  /**
   * 角色的权限列表
   */
  private transient List<Menu> menuList = new ArrayList<>();

}
